<%-- 
    Document   : AllKhachHang
    Created on : Jun 23, 2013, 2:10:10 AM
    Author     : quannq
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<br>
<table cellpadding="0" cellspacing="0" border="1" class="display example"
       style="color: black; width: 1000px;">
    <thead align="center">
        <tr>
            <th>ID</th>
            <th>Tên</th>
            <th>Mail</th>
            <th>Điện Thoại</th>
            <th>Status</th>
            <th>Hóa Đơn</th>
        </tr>
    </thead>
    <tbody align="center">
        <c:if test="${fn:length(khachhang) == 0}">
            <tr class="gradeX">
                <td>No data</td>
            </tr>
        </c:if>

        <c:if test="${fn:length(khachhang) > 0}">
            <c:forEach items="${khachhang}" var="kh">
                <tr class="gradeX">
                    <td>${kh.mand}</td>
                    <td><a href="javascript:modalFormUpdate('infokhachhang',${kh.mand});">${kh.tennd}</a></td>
                    <td><a href="mailto:${kh.username}">${kh.username}</a></td>
                    <td>${kh.dienthoai}</td>
                    <td>
                        <c:if test="${kh.status eq 1}">Actived</c:if>
                        <c:if test="${kh.status eq 0}">Waiting</c:if>
                    </td>
                    <td><img src="${pageContext.request.contextPath}/image/admin/view.png"
                             onclick="loadList('hoadon', 'listhoadon',${kh.mand});"/></td>
                </tr>
            </c:forEach>
        </c:if>
    </tbody>
</table>
<div id="hoadon"></div>
<div id="chitiet"></div>
